package com.landeb.shop.huo.adapter;

import android.widget.ImageView;

import com.bumptech.glide.Glide;
import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.landeb.shop.R;
import com.landeb.shop.huo.bean.BeanProductFragRightGv;

import java.util.List;

/**
 * Created by blade on 2017/8/29.
 */

public class Skip4ProductFragActAdapter extends BaseQuickAdapter<BeanProductFragRightGv.DataBean.ListBean,BaseViewHolder> {

    public Skip4ProductFragActAdapter(List<BeanProductFragRightGv.DataBean.ListBean> data) {
        super(R.layout.item_skip_pro_frag_rv, data);
    }

    @Override
    protected void convert(BaseViewHolder helper, BeanProductFragRightGv.DataBean.ListBean item) {

        helper.setText(R.id.title_item_frag_product_gridView,item.getName())
                .setText(R.id.price_item_frag_product_gridView, "￥"+item.getPrice())
                .setText(R.id.sale_count_item_frag_product_gridView,"销量："+item.getCount_sale());
        Glide.with(mContext).load(item.getPic()).into((ImageView) helper.getView(R.id.imgV_item_frag_product_gridView));

    }
}
